package com.shide.flow.demo.core;

import com.shide.flow.demo.engine.FlowEngine;
import com.shide.flow.demo.entity.FlowInstance;
import com.shide.flow.demo.entity.FlowTask;
import com.shide.flow.demo.entity.FlowTaskActor;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author yuwg
 */
@Data
public class Execution implements Serializable {
    /**
     * 流程引擎
     */
    private FlowEngine flowEngine;
    /**
     * 流程实例对象
     */
    private FlowInstance flowInstance;
    /**
     * 父流程实例
     */
    private FlowInstance parentFlowInstance;
    /**
     * 下一个审批参与者
     */
    private FlowTaskActor nextFlowTaskActor;
    /**
     * 父流程实例节点名称
     */
    private String parentNodeName;
    /**
     * 子流程实例节点
     */
    private Long childInstanceId;
    /**
     * 执行参数
     */
    private Map<String, Object> args;
    /**
     * 创建人
     */
    private FlowCreator flowCreator;

    /**
     * 当前执行任务
     */
    private FlowTask flowTask;
    /**
     * 返回的任务列表
     */
    private List<FlowTask> flowTasks = new ArrayList<>();
    /**
     * 是否合并
     */
    private boolean isMerged = false;
}
